from po.base import Base
from selenium.webdriver.common.by import By

class Page4(Base):
    #定位器
    login_loc=(By.XPATH,'/html/body/div[1]/div/section/aside/ul/li/ul/li[12]/a')
    username_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[1]/div/input')
    password_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[2]/div/input')
    login_btn=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/button[2]')

    def login(self):
        self.click(self.login_loc)

    def username(self,username):
        self.send_keys(self.username_loc,username)

    def password(self,password):
        self.send_keys(self.password_loc,password)

    def loginbtn(self):
        self.click(self.login_btn)